package com.pc.tas.servlet;

import com.pc.cloud.core.Container;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class CommitServlet extends HttpServlet {

	private static final long serialVersionUID = -500048887717881255L;

	public CommitServlet() {
		super();
	}


	public void destroy() {
		super.destroy();
	}

	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		this.doPost(request, response);
	}
	
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		try {
			String p = Container.searchHandler.commit();
			response.getWriter().write(p);
		} catch (Exception e) {
			e.printStackTrace();
		}
	}

	
	public void init() throws ServletException {
	}

}
